{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content layui-form">
                    <div class="layui-row layui-col-space10 layui-form-item ">
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <h5 style="color: cornflowerblue">驳回请填写原因，同意请选择赠送比例</h5>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <div class="layui-input-block">
                                <textarea name="msg" class="layui-input" style="height: 100px;"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">赠送比例：</label>
                            <div class="layui-input-inline">
                                <select name="shop_ratio">
                                    <option value="7" {if $have == 7}selected{/if}>7折</option>
                                    <option value="7.5" {if $have == 7.5}selected{/if}>7.5折</option>
                                    <option value="8" {if $have == 8}selected{/if}>8折</option>
                                    <option value="8.5" {if $have == 8.5}selected{/if}>8.5折</option>
                                    <option value="9" {if $have == 9}selected{/if}>9折</option>
                                    <option value="9.5" {if $have == 9.8}selected{/if}>9.5折</option>
                                    <option value="9.8" {if $have == 9.8}selected{/if}>9.8折</option>
                                    <option value="9.8" {if !$have}selected{/if}>不送积分，手续费率0.38</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">审核：</label>
                            <div class="layui-input-block">
                                <input type="radio" name="type" value="2" title="同意" checked>
                                <input type="radio" name="type" value="4" title="拒绝" >
                            </div>
                        </div>
                        <input type="hidden" value="{$shop_id}" name="shop_id">
                        <input type="hidden" value="{$user_id}" name="user_id">
                        <input type="hidden" value="101" name="temp">
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit="" lay-filter="component-form-element">确定
                                </button>
                                <button class="layui-btn layui-btn-primary" onclick="wk.layer_close('close')">关闭</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
<script>
    layui.use(['form','upload','layedit'], function() {
        var form = layui.form;
        form.on('submit(component-form-element)', function (data) {
            $('.layui-btn').addClass('layui-disabled').attr('disabled','disabled');
            $.ajax({
                url:"{:url('doCheck')}",
                type:'post',
                dataType:'json',
                data:data.field,
                success:function(res){
                    if (res.code == 200) {
                        layer.msg(res.msg,{icon:1,time:1500,shade:0.1},function(index){
                            wk.layer_close();
                        })
                    } else {
                        wk.error(res.msg,'','$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\');');
                    }
                }
            })
        });
    });
</script>
</body>
</html>